package org.wmq.skyserver.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.wmq.skyserver.service.ShopService;

@Service
public class ShopServiceImpl implements ShopService {
    @Autowired
    private RedisTemplate redisTemplate;

    @Override
    public void setStatus(Integer status, Long id) {
        this.redisTemplate.opsForValue().set("status:" + id, status);
    }

    @Override
    public Integer getStatus(Long id) {
        return (Integer) this.redisTemplate.opsForValue().get("status:"+id);
    }
}
